# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: team/kde <bribbers@disroot.org>

# The group tag is just to easily find this APKBUILD by some scripts for automation
# group=kde-applications
pkgname=artikulate
pkgver=23.08.4
pkgrel=0
# armhf blocked by qt5-qtdeclarative
arch="all !armhf"
url="https://edu.kde.org/artikulate"
pkgdesc="Improve your pronunciation by listening to native speakers"
license="(GPL-2.0-only OR GPL-3.0-only) AND GFDL-1.2-only"
depends="kirigami2"
makedepends="
	extra-cmake-modules
	karchive5-dev
	kconfig5-dev
	kcrash5-dev
	kdoctools5-dev
	ki18n5-dev
	kirigami2-dev
	knewstuff5-dev
	kxmlgui5-dev
	qt5-qtbase-dev
	qt5-qtdeclarative-dev
	qt5-qtmultimedia-dev
	qt5-qtxmlpatterns-dev
	samurai
	"
_repo_url="https://invent.kde.org/education/artikulate.git"
source="https://download.kde.org/stable/release-service/$pkgver/src/artikulate-$pkgver.tar.xz"
subpackages="$pkgname-doc $pkgname-lang"

build() {
	cmake -B build -G Ninja \
		-DCMAKE_BUILD_TYPE=MinSizeRel \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib
	cmake --build build
}

check() {
	ctest --test-dir build --output-on-failure
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}

sha512sums="
2e03ad0788ccab991463ba7bac591d3010f98f07ea56df0c1e4f43b2c33255e00549a07a4b65e48b30daf178a7bc96012442fc27b2a1d351983259f3a61ee471  artikulate-23.08.4.tar.xz
"
